home *** CD-ROM | disk | FTP | other *** search
Makefile | 1994-11-15 | 5.4 KB | 137 lines | [TEXT/MPS ] |
- #
- # makefile for "fileCompress.r", the example for InstaCompOne file compression
- #
- #
- # to build installer script :
- # 1) select "Build" from "Build" menu
- # 2) type script name "fileCompress" ( note: ".r" is omitted )
- #
- # to build debug version of installer script :
- # 1) select "Build" from "Build" menu
- # 2) type script name "fileCompress.debug" ( note: ".r" is omitted )
- #
- #
- # mark young - 08/17/94
- #
-
- # • script names
-
- # the installer script name
- scriptName = fileCompress
- # the debug version installer script name
- debugScriptName = {scriptName}.debug
- # filename for ScriptCheck extension that will run when ScriptCheck does
- localScriptCheckExtName = {scriptName}.scx
-
- # • tool names
-
- # • support directory names
-
- # directory where ScriptCheck MPW tool can be found
- ScriptCheckDir = :::ScriptCheck 4.0.3:
- # directory where RIncludes can be found
- InstallerRIncDir = :::DeveloperInterfaces:RIncludes:
- # directory where the Installer Debugger can be found
- InstallerDebuggerDir = :::Installer Debugger 4.0:
- # directory where the InstaCompOne stuff can be found
- InstaCompOneDir = :::InstaCompOne 1.0:
-
-
- # InstaCompOne compression tool
- compressTool = {InstaCompOneDir}InstaCompOneTool
-
- # Splitting tool
- splitTool = {InstaCompOneDir}FileAndRsrcSplitterTool
-
- # Original ScriptCheck Extension
- ScriptCheckExtension = {InstaCompOneDir}InstaCompOneSCExt.rsrc
-
-
- # • simple compression example
-
- # source file to be compressed
- SimpleSourceFileName = TeachText • 1
- # archive file to be compressed into
- SimpleArchiveName = :Disk 1:Tome
-
- # • split compression example
-
- # source file to be split and compressed
- SplitCompSourceFileName = TeachText • 2
- # base name to use for files resulting from splitting operation
- SplitCompFileName = splitCompTeachText
- # first interim file resulting from splitting operation
- SplitCompFileName1 = splitCompTeachText.rsrc1
- # second interim file resulting from splitting operation
- SplitCompFileName2 = splitCompTeachText.rsrc2
- # archive resulting from compression of first interim file
- SplitCompArchiveName1 = :Disk 1:splitCompTome1
- # archive resulting from compression of second interim file
- SplitCompArchiveName2 = :Disk 2:splitCompTome2
-
- # • split w/o compression example
-
- # source file to be split, but not compressed
- SplitSourceFileName = TeachText • 3
- # base name to use for files resulting from splitting operation
- SplitFileName = splitTeachText
- # first interim file resulting from splitting operation
- SplitFileName1 = splitTeachText.rsrc1
- # second interim file resulting from splitting operation
- SplitFileName2 = splitTeachText.rsrc2
- # first archive resulting from splitting of file
- SplitArchiveName1 = :Disk 1:splitTome1
- # second archive resulting from splitting of file
- SplitArchiveName2 = :Disk 2:splitTome2
-
-
-
- # make the debug version of finished installer script
- "{debugScriptName}" ƒ "{scriptName}"
- # make a copy of the finished installer script and rename the copy
- Duplicate -y "{scriptName}" "{scriptName} w/ Debugger"
- # add the installer debugger resources to the copied installer script
- Rez -m "{InstallerDebuggerDir}Installer Debugger.r" -append -o "{scriptName} w/ Debugger"
-
- # make the standard version of finished installer script
- "{scriptName}" ƒ makefile "{scriptName}.r" "{SimpleArchiveName}" "{SplitCompArchiveName1}" "{SplitArchiveName1}" "{localScriptCheckExtName}"
- # establish current date with time of NOON
- set theTime "'`date -d -s` 12:00:00 PM'"
- # rez the installer source into the form that the installer can read
- Rez "{scriptName}.r" -o "{scriptName}" -t 'kajr' -c 'kajr' -i "{InstallerRIncDir}"
- # establish filename for finished installer script, set creation date and time, set attributes
- SetFile -a b -d {theTime} "{scriptName}"
- # run scriptcheck utility on the rezzed installer script
- "{ScriptCheckDir}ScriptCheck" "{scriptName}" -h -d -a
- # set modification date and time for finished installer script
- SetFile -m {theTime} "{scriptName}"
-
- # be sure that's there's a copy of the InstaCompOne ScriptCheck extension in current folder
- "{localScriptCheckExtName}" ƒ "{ScriptCheckExtension}"
- # copy and rename the original scriptcheck extension
- Duplicate -y "{ScriptCheckExtension}" "{localScriptCheckExtName}"
-
- # do the simple compression
- "{SimpleArchiveName}" ƒ makefile "{SimpleSourceFileName}"
- # compress entire source file into one archive
- "{compressTool}" "{SimpleSourceFileName}" -o "{SimpleArchiveName}"
-
- # do the split compression
- "{SplitCompArchiveName1}" ƒ makefile "{SplitCompSourceFileName}"
- # split source file into parts no larger than 20K - place in two interim files
- "{splitTool}" "{SplitCompSourceFileName}" -s 20000 -o "{SplitCompFileName}"
- # compress contents of first interim file into first archive
- "{compressTool}" "{SplitCompFileName1}" -o "{SplitCompArchiveName1}" -f "{SplitCompSourceFileName}" -e
- # compress contents of second interim file into second archive
- "{compressTool}" "{SplitCompFileName2}" -o "{SplitCompArchiveName2}" -f "{SplitCompSourceFileName}" -e
-
- # do the split w/o compression
- "{SplitArchiveName1}" ƒ makefile "{SplitSourceFileName}"
- # split source file into parts no larger than 20K - place in two interim files
- "{splitTool}" "{SplitSourceFileName}" -s 20000 -o "{SplitFileName}"
- # create archive with first part of split file by copying first interim file
- Duplicate -y "{SplitFileName1}" "{SplitArchiveName1}"
- # create archive with second part of split file by copying second interim file
- Duplicate -y "{SplitFileName2}" "{SplitArchiveName2}"
-
-